/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package TCP;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.logging.Level;
import java.util.logging.Logger;
import Communication.*;
import java.io.BufferedWriter;
import java.io.OutputStreamWriter;


/**
 *
 * @author Arthur
 */
public class ComunicaTCPClient {
    
    public static void main(String[] args){
        try {
            Socket echoSocket = null;
            echoSocket = new Socket("localhost", TCPServer.port);
            BufferedReader in = new BufferedReader(new InputStreamReader(echoSocket.getInputStream()));
            BufferedWriter out = new BufferedWriter(new OutputStreamWriter(echoSocket.getOutputStream()));
            Communica A = new Communica(out,new ListenSocket(in));
            
        } catch (UnknownHostException ex) {
            Logger.getLogger(ComunicaTCPClient.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(ComunicaTCPClient.class.getName()).log(Level.SEVERE, null, ex);
        }
        

    }
    
 

}
